﻿Public Class cakerList
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub
    Protected Function getUserAvgRating(ByVal userAvgStar As Integer)

        Dim retval As String
        retval = ""
        For i = 1 To userAvgStar
            retval = retval + "<img src='img/star2.png' />"
        Next
        Return retval


    End Function

    Protected Function getAge(ByVal age As Integer)
        Dim retval As String
        retval = ""
        Select Case age
            Case Is < 20
                Return retval + "<img src='img/upto19.png'/>"
            Case Is < 30
                Return retval + "<img src='img/upto29.png'/>"
            Case Is < 40
                Return retval + "<img src='img/upto39.png'/>"
            Case Is < 50
                Return retval + "<img src='img/upto49.png'/>"
            Case Is < 60
                Return retval + "<img src='img/upto59.png'/>"
            Case Is > 59
                Return retval + "<img src='img/60plus.png'/>"
        End Select
        Return retval
    End Function
End Class